//
//  LoginAPI.h
//  RainbowFM
//
//  Created by chenli on 14/12/16.
//  Copyright (c) 2014年 RB. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface LoginAPI : NSObject

/**
 *  获取手机验证码
 *
 *  @param phoneNum 用户手机号
 *  @param res      <#res description#>
 */
-(void)fetchSecurityCodeWithPhoneNum:(NSString *)phoneNum result:(void(^)(BOOL success,NSString *msg))res;

/**
 *  验证短信验证码
 *
 *  @param code     <#code description#>
 *  @param phoneNum <#phoneNum description#>
 *  @param res      <#res description#>
 */
-(void)verifyPhoneNumAndCode:(NSString *)code phoneNum:(NSString *)phoneNum result:(void(^)(NSString *code,NSString *msg))res;

/**
 *  快速注册
 *
 *  @param phoneNum <#phoneNum description#>
 *  @param code     <#code description#>
 *  @param pwd      <#pwd description#>
 *  @param tokenStr <#tokenStr description#>
 *  @param res      <#res description#>
 */
-(void)registerWithPhoneNum:(NSString *)phoneNum smsCode:(NSString *)code password:(NSString *)pwd result:(void(^)(BOOL success,NSString *msg))res;


/**
 *  登录验证
 *
 *  @param phoneNum <#phoneNum description#>
 *  @param pwd      <#pwd description#>
 *  @param res      <#res description#>
 */
-(void)loginWithPhoneNum:(NSString *)phoneNum password:(NSString *)pwd result:(void(^)(NSString *token,NSString *userID,NSString *msg))res;


/**
 *  退出登录
 *
 *  @param userId <#userId description#>
 *  @param res    <#res description#>
 */
-(void)loginOutWithUserID:(NSString *)userId result:(void(^)(BOOL success))res;

@end
